import numpy as np
from sklearn.datasets import load_digits
from sklearn.preprocessing import label_binarize
from sklearn.multiclass import OneVsRestClassifier
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC

digits = load_digits()

x, y = digits.data, digits.target
y = label_binarize(y, classes=list(range(10)))
x_train, x_test, y_train, y_test = train_test_split(x, y)
model = OneVsRestClassifier(SVC(kernel='linear'))
clf = model.fit(x_train, y_train)